<?php
/**
 * Copyright (c) 2006, PORTALIER Julien
 *
 * Licensed under The LGPL License
 * Redistributions of files must retain the above copyright notice.
 *
 * @package      FeatherCMS
 * @subpackage   Contact
 * @copyright    Copyright (c) 2006, Julien PORTALIER
 * @link         http://julien.portalier.com
 * @license      http://www.opensource.org/licenses/lgpl-license.php The LGPL License
 */

class Contact extends Model
{
	protected $useTable = false;
	
	function beforeValidate()
	{
		if (empty($this->validate))
		{
			$this->validate = array(
				'subject' => array(Valid::NotEmpty => _('Please entitle your message.')),
				'message' => array(Valid::NotEmpty => _('Oops, you forgot to enter your message!')),
				'email' => array(
					Valid::NotEmpty => _('Please provide us with your email so we may reply.'),
					Valid::Email    => _("Oops, your email seems invalid.")
				)
			);
		}
		return true;
	}
}
?>